﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;


/*This class was created to modify the out put through the original middle layer for this software. That's why this class is a partial class. It uses the auto generated code from the .edmx model
 **/



namespace DefectDBTypes
{
    public partial class Developer : Person, IObjectWithChangeTracker, INotifyPropertyChanged
    {
        public string Name
        {
            get
            {
                return First_Name + " " + Last_Name;
            }
        }

        public int ClosedTroubleReportCount
        {
            get
            {
                return Trouble_Report.Count((tr) => tr.IsClosed);
            }
        }

        public int OpenTroubleReportCount
        {
            get
            {
                return Trouble_Report.Count((tr) => !tr.IsClosed);
            }
        }

        public int TotalTroubleReportCount
        {
            get
            {
                return Trouble_Report.Count;
            }
        }


    }
}
